
<div class="administration">    
    <div class="administrationModule">
        <form name="formAdministrationModule" id="formAdministrationModule" method="POST" action="<?php echo base_url()."index.php/administration/adminmodule1"; ?>">
             <input type="hidden" value="<?php echo $module[0]->idmodule; ?>" name="choixModule" />
            <div class="administrationModuleTitre">
                <span>Questions administration module <?php echo $module[0]->nom; ?></span>
            </div>
            <div class="administrationModuleChoix">
                <span>Listes des questions du module</span>
                <table id="arrayQuestions" class="display" cellspacing="0">
                    <thead>
                        <tr>
                            <th>libelle </th>                    
                            <th>Type </th> 
                            <th>Cat&eacute;gorie</th> 
                            <th>Ordre</th>                             
                            <th></th> 
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                            foreach ($listeQuestionModule->result() as $row)
                            {                
                                echo "<tr><td>".$row->Nomquestion."</td><td>".$row->typequestion."</td><td>".$row->Categquestion."</td><td>".$row->ordre."</td><td><a href='#' onClick='supprimerQuestion_onClick(".$row->idquestion.",".$module[0]->idmodule.")'>Supprimer</a></td></tr>";
                            }                
                        ?>            
                    </tbody>
                </table> 
                <div class="validEnsignantModule">
                <p>
                    <label>Enseignant du module</label><select id="lstenseignantModule"><option value="-1" >Choisir un enseignant..</option>
                        <?php
                            foreach ($listeEnseignant->result() as $row)
                            {                
                                echo '<option value="'.$row->iduser.'" ';
                                if ($row->iduser == $module[0]->idenseignant)
                                {
                                    echo ' selected="selected"';
                                }
                                echo ">".$row->nom." ".$row->prenom."</option>";
                            }                
                        ?>  
                    </select><input type="button" value="Valider" id="validerModuleEnseignant" onclick="validerEnseignantModule_onClick(<?php echo $module[0]->idmodule; ?>)" />
                </p>
                </div>
            </div>
             
        </form>
       
        <div class="allquestion">
            <div class="addQestion">
                <form name="formAdministrationModuleAddQuestion" id="formAdministrationModuleAddQuestion" method="POST" action="<?php echo base_url()."index.php/administration/addquestion"; ?>">
                    <input type="hidden" value="<?php echo $module[0]->idmodule; ?>" name="choixModule" />
                    <fieldset><legend>Ajouter une nouvelle question</legend>                   
                        <label>Libelle question</label><input type="text" id="idLibelleQuestion" name="libelleQuestion" />     <br/>  
                        <label>Type de question</label><select id="idTypeQuestion" name="TypeQuestion"><option value="-1">Choisir un type de question..</option><option value="1">Oui/Non</option><option value="2">Texte</option><option value="3">Commentaire</option><option value="4">Note</option><option value="5">Oui/Non + Si oui</option><option value="6">Liste des modules</option><option value="7">Liste des semestres</option></select><br/>
                        <label>Cat&eacute;gorie question</label><select id="idCategorieQuestion" name="CategorieQuestion"><option value="-1">Choisir une cat&eacute;gorie..</option><option value="1">Evaluez la session</option><option value="2">Evaluez le module</option><option value="3">Evaluez la formation</option> </select>  <br/>
                        <label>Ordre question</label><input type="text" id="idOrdreQuestion" name="ordreQuestion" /></select>        <br/>

                        <input type="button" id="AjouterNewQuestion" value="Ajouter"/>
                        <div id="idErrorAjoutQuestion" class="errorInscription"><span>Tous les champs sont obligatoires !</span></div>
                    </fieldset>
                 </form>                
            </div>      
        
            <div class="chooseQestion">
                <form name="formAdministrationModuleChooseQuestion" id="formAdministrationModuleChooseQuestion" method="POST" action="<?php echo base_url()."index.php/administration/adminmodule1"; ?>">
                    <input type="hidden" value="<?php echo $module[0]->idmodule; ?>" name="choixModule" />    
                    <fieldset><legend>choisir une question</legend>
                        <table id="arrayQuestionsAll" class="display" cellspacing="0">
                            <thead>
                                <tr>
                                    <th>libelle </th>                    
                                    <th>Type </th> 
                                    <th>Cat&eacute;gorie</th>
                                    <th>Ordre</th> 
                                    <th></th> 
                                </tr>
                            </thead>
                            <tbody>
                                <?php
                                    foreach ($listeQuestionAll->result() as $row)
                                    {                
                                        echo "<tr><td>".$row->Nomquestion."</td><td>".$row->typequestion."</td><td>".$row->Categquestion."</td><td><input type='text' id='idOrdreChoixQuestion_".$row->idquestion."' name='ordreChoixQuestion' style='width:20px' /></td><td><a href='#' onClick='ajoutChoixQuestion_onClick(".$row->idquestion.",".$module[0]->idmodule.")'>Ajouter</a></td></tr>";
                                    }                
                                ?>            
                            </tbody>
                        </table>
                    </fieldset>
                </form>
            </div>
        </div>
    </div>    
</div>
